3.1.17 \(\int (c e+d e x) (a+b \tanh ^{-1}(c+d x))^2 \, dx\) [17]

Optimal. Leaf size=95 \[ a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d} \]

[Out]

a*b*e*x+b^2*e*(d*x+c)*arctanh(d*x+c)/d-1/2*e*(a+b*arctanh(d*x+c))^2/d+1/2*e*(d*x+c)^2*(a+b*arctanh(d*x+c))^2/d
+1/2*b^2*e*ln(1-(d*x+c)^2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6242, 12, 6037, 6127, 6021, 266, 6095} \begin {gather*} \frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+a b e x+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]

[Out]

a*b*e*x + (b^2*e*(c + d*x)*ArcTanh[c + d*x])/d - (e*(a + b*ArcTanh[c + d*x])^2)/(2*d) + (e*(c + d*x)^2*(a + b*
ArcTanh[c + d*x])^2)/(2*d) + (b^2*e*Log[1 - (c + d*x)^2])/(2*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rule 6095

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rule 6127

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2
/e, Int[(f*x)^(m - 2)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[d*(f^2/e), Int[(f*x)^(m - 2)*((a + b*ArcTanh[c*x])
^p/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 6242

Int[((a_.) + ArcTanh[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[
Int[(f*(x/d))^m*(a + b*ArcTanh[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f,
 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int (c e+d e x) \left (a+b \tanh ^{-1}(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int e x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e \text {Subst}\left (\int x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {(b e) \text {Subst}\left (\int \frac {x^2 \left (a+b \tanh ^{-1}(x)\right )}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {(b e) \text {Subst}\left (\int \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}-\frac {(b e) \text {Subst}\left (\int \frac {a+b \tanh ^{-1}(x)}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {\left (b^2 e\right ) \text {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {\left (b^2 e\right ) \text {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 134, normalized size = 1.41 \begin {gather*} e \left (\frac {a b (c+d x)}{d}+\frac {a^2 (c+d x)^2}{2 d}+\frac {b (c+d x) (b+a (c+d x)) \tanh ^{-1}(c+d x)}{d}+\frac {\left (-b^2+b^2 (c+d x)^2\right ) \tanh ^{-1}(c+d x)^2}{2 d}+\frac {\left (a b+b^2\right ) \log (1-c-d x)}{2 d}+\frac {\left (-a b+b^2\right ) \log (1+c+d x)}{2 d}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]

[Out]

e*((a*b*(c + d*x))/d + (a^2*(c + d*x)^2)/(2*d) + (b*(c + d*x)*(b + a*(c + d*x))*ArcTanh[c + d*x])/d + ((-b^2 +
 b^2*(c + d*x)^2)*ArcTanh[c + d*x]^2)/(2*d) + ((a*b + b^2)*Log[1 - c - d*x])/(2*d) + ((-(a*b) + b^2)*Log[1 + c
 + d*x])/(2*d))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(271\) vs. \(2(89)=178\).
time = 0.08, size = 272, normalized size = 2.86

method result size
derivativedivides \(\frac {\frac {e \left (d x +c \right )^{2} a^{2}}{2}+\frac {e \,b^{2} \left (d x +c \right )^{2} \arctanh \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (d x +c \right ) \arctanh \left (d x +c \right )+\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c -1\right )}{2}-\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c +1\right )}{2}-\frac {e \,b^{2} \ln \left (d x +c -1\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {e \,b^{2} \ln \left (d x +c -1\right )^{2}}{8}+\frac {e \,b^{2} \ln \left (d x +c -1\right )}{2}+\frac {e \,b^{2} \ln \left (d x +c +1\right )}{2}-\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (d x +c +1\right )}{4}+\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {e \,b^{2} \ln \left (d x +c +1\right )^{2}}{8}+b a e \left (d x +c \right )^{2} \arctanh \left (d x +c \right )+e \left (d x +c \right ) a b +\frac {b a e \ln \left (d x +c -1\right )}{2}-\frac {b a e \ln \left (d x +c +1\right )}{2}}{d}\) \(272\)
default \(\frac {\frac {e \left (d x +c \right )^{2} a^{2}}{2}+\frac {e \,b^{2} \left (d x +c \right )^{2} \arctanh \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (d x +c \right ) \arctanh \left (d x +c \right )+\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c -1\right )}{2}-\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c +1\right )}{2}-\frac {e \,b^{2} \ln \left (d x +c -1\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {e \,b^{2} \ln \left (d x +c -1\right )^{2}}{8}+\frac {e \,b^{2} \ln \left (d x +c -1\right )}{2}+\frac {e \,b^{2} \ln \left (d x +c +1\right )}{2}-\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (d x +c +1\right )}{4}+\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {e \,b^{2} \ln \left (d x +c +1\right )^{2}}{8}+b a e \left (d x +c \right )^{2} \arctanh \left (d x +c \right )+e \left (d x +c \right ) a b +\frac {b a e \ln \left (d x +c -1\right )}{2}-\frac {b a e \ln \left (d x +c +1\right )}{2}}{d}\) \(272\)
risch \(\frac {e \,b^{2} \left (d^{2} x^{2}+2 c d x +c^{2}-1\right ) \ln \left (d x +c +1\right )^{2}}{8 d}+\frac {b e \left (-b \,d^{2} x^{2} \ln \left (-d x -c +1\right )+2 a \,d^{2} x^{2}-2 b d x \ln \left (-d x -c +1\right ) c +4 a d x c -\ln \left (-d x -c +1\right ) b \,c^{2}+2 b d x +b \ln \left (-d x -c +1\right )\right ) \ln \left (d x +c +1\right )}{4 d}+\frac {e d \,b^{2} x^{2} \ln \left (-d x -c +1\right )^{2}}{8}+\frac {e \,b^{2} c x \ln \left (-d x -c +1\right )^{2}}{4}-\frac {e d a b \,x^{2} \ln \left (-d x -c +1\right )}{2}+\frac {e \,b^{2} c^{2} \ln \left (-d x -c +1\right )^{2}}{8 d}-e a b c x \ln \left (-d x -c +1\right )+\frac {a^{2} d e \,x^{2}}{2}+\frac {e \ln \left (-d x -c -1\right ) a b \,c^{2}}{2 d}-\frac {e \ln \left (d x +c -1\right ) a b \,c^{2}}{2 d}-\frac {e \,b^{2} x \ln \left (-d x -c +1\right )}{2}+e \,a^{2} c x +\frac {e \ln \left (-d x -c -1\right ) b^{2} c}{2 d}-\frac {e \ln \left (d x +c -1\right ) b^{2} c}{2 d}-\frac {e \,b^{2} \ln \left (-d x -c +1\right )^{2}}{8 d}+b a e x -\frac {e \ln \left (-d x -c -1\right ) a b}{2 d}+\frac {e \ln \left (-d x -c -1\right ) b^{2}}{2 d}+\frac {e \ln \left (d x +c -1\right ) a b}{2 d}+\frac {e \ln \left (d x +c -1\right ) b^{2}}{2 d}\) \(441\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2*e*(d*x+c)^2*a^2+1/2*e*b^2*(d*x+c)^2*arctanh(d*x+c)^2+e*b^2*(d*x+c)*arctanh(d*x+c)+1/2*e*b^2*arctanh(d
*x+c)*ln(d*x+c-1)-1/2*e*b^2*arctanh(d*x+c)*ln(d*x+c+1)-1/4*e*b^2*ln(d*x+c-1)*ln(1/2*d*x+1/2*c+1/2)+1/8*e*b^2*l
n(d*x+c-1)^2+1/2*e*b^2*ln(d*x+c-1)+1/2*e*b^2*ln(d*x+c+1)-1/4*e*b^2*ln(-1/2*d*x-1/2*c+1/2)*ln(d*x+c+1)+1/4*e*b^
2*ln(-1/2*d*x-1/2*c+1/2)*ln(1/2*d*x+1/2*c+1/2)+1/8*e*b^2*ln(d*x+c+1)^2+b*a*e*(d*x+c)^2*arctanh(d*x+c)+e*(d*x+c
)*a*b+1/2*b*a*e*ln(d*x+c-1)-1/2*b*a*e*ln(d*x+c+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 320 vs. \(2 (94) = 188\).
time = 0.44, size = 320, normalized size = 3.37 \begin {gather*} \frac {1}{2} \, a^{2} d x^{2} e + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c x e + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac {{\left (b^{2} d^{2} x^{2} e + 2 \, b^{2} c d x e + {\left (c^{2} - 1\right )} b^{2} e\right )} \log \left (d x + c + 1\right )^{2} + {\left (b^{2} d^{2} x^{2} e + 2 \, b^{2} c d x e + {\left (c^{2} - 1\right )} b^{2} e\right )} \log \left (-d x - c + 1\right )^{2} + 4 \, {\left (b^{2} d x e + b^{2} {\left (c + 1\right )} e\right )} \log \left (d x + c + 1\right ) - 2 \, {\left (2 \, b^{2} d x e + 2 \, b^{2} {\left (c - 1\right )} e + {\left (b^{2} d^{2} x^{2} e + 2 \, b^{2} c d x e + {\left (c^{2} - 1\right )} b^{2} e\right )} \log \left (d x + c + 1\right )\right )} \log \left (-d x - c + 1\right )}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*a^2*d*x^2*e + 1/2*(2*x^2*arctanh(d*x + c) + d*(2*x/d^2 - (c^2 + 2*c + 1)*log(d*x + c + 1)/d^3 + (c^2 - 2*c
 + 1)*log(d*x + c - 1)/d^3))*a*b*d*e + a^2*c*x*e + (2*(d*x + c)*arctanh(d*x + c) + log(-(d*x + c)^2 + 1))*a*b*
c*e/d + 1/8*((b^2*d^2*x^2*e + 2*b^2*c*d*x*e + (c^2 - 1)*b^2*e)*log(d*x + c + 1)^2 + (b^2*d^2*x^2*e + 2*b^2*c*d
*x*e + (c^2 - 1)*b^2*e)*log(-d*x - c + 1)^2 + 4*(b^2*d*x*e + b^2*(c + 1)*e)*log(d*x + c + 1) - 2*(2*b^2*d*x*e
+ 2*b^2*(c - 1)*e + (b^2*d^2*x^2*e + 2*b^2*c*d*x*e + (c^2 - 1)*b^2*e)*log(d*x + c + 1))*log(-d*x - c + 1))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (94) = 188\).
time = 0.40, size = 333, normalized size = 3.51 \begin {gather*} \frac {{\left ({\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - b^{2}\right )} \cosh \left (1\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - b^{2}\right )} \sinh \left (1\right )\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2} + 4 \, {\left (a^{2} d^{2} x^{2} + 2 \, {\left (a^{2} c + a b\right )} d x\right )} \cosh \left (1\right ) + 4 \, {\left ({\left (a b c^{2} + b^{2} c - a b + b^{2}\right )} \cosh \left (1\right ) + {\left (a b c^{2} + b^{2} c - a b + b^{2}\right )} \sinh \left (1\right )\right )} \log \left (d x + c + 1\right ) - 4 \, {\left ({\left (a b c^{2} + b^{2} c - a b - b^{2}\right )} \cosh \left (1\right ) + {\left (a b c^{2} + b^{2} c - a b - b^{2}\right )} \sinh \left (1\right )\right )} \log \left (d x + c - 1\right ) + 4 \, {\left ({\left (a b d^{2} x^{2} + {\left (2 \, a b c + b^{2}\right )} d x\right )} \cosh \left (1\right ) + {\left (a b d^{2} x^{2} + {\left (2 \, a b c + b^{2}\right )} d x\right )} \sinh \left (1\right )\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right ) + 4 \, {\left (a^{2} d^{2} x^{2} + 2 \, {\left (a^{2} c + a b\right )} d x\right )} \sinh \left (1\right )}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="fricas")

[Out]

1/8*(((b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - b^2)*cosh(1) + (b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - b^2)*sinh(1
))*log(-(d*x + c + 1)/(d*x + c - 1))^2 + 4*(a^2*d^2*x^2 + 2*(a^2*c + a*b)*d*x)*cosh(1) + 4*((a*b*c^2 + b^2*c -
 a*b + b^2)*cosh(1) + (a*b*c^2 + b^2*c - a*b + b^2)*sinh(1))*log(d*x + c + 1) - 4*((a*b*c^2 + b^2*c - a*b - b^
2)*cosh(1) + (a*b*c^2 + b^2*c - a*b - b^2)*sinh(1))*log(d*x + c - 1) + 4*((a*b*d^2*x^2 + (2*a*b*c + b^2)*d*x)*
cosh(1) + (a*b*d^2*x^2 + (2*a*b*c + b^2)*d*x)*sinh(1))*log(-(d*x + c + 1)/(d*x + c - 1)) + 4*(a^2*d^2*x^2 + 2*
(a^2*c + a*b)*d*x)*sinh(1))/d

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (83) = 166\).
time = 1.10, size = 238, normalized size = 2.51 \begin {gather*} \begin {cases} a^{2} c e x + \frac {a^{2} d e x^{2}}{2} + \frac {a b c^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname {atanh}{\left (c + d x \right )} + a b d e x^{2} \operatorname {atanh}{\left (c + d x \right )} + a b e x - \frac {a b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} c^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname {atanh}^{2}{\left (c + d x \right )} + \frac {b^{2} c e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} d e x^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{2} + b^{2} e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b^{2} e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} - \frac {b^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atanh}{\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*atanh(d*x+c))**2,x)

[Out]

Piecewise((a**2*c*e*x + a**2*d*e*x**2/2 + a*b*c**2*e*atanh(c + d*x)/d + 2*a*b*c*e*x*atanh(c + d*x) + a*b*d*e*x
**2*atanh(c + d*x) + a*b*e*x - a*b*e*atanh(c + d*x)/d + b**2*c**2*e*atanh(c + d*x)**2/(2*d) + b**2*c*e*x*atanh
(c + d*x)**2 + b**2*c*e*atanh(c + d*x)/d + b**2*d*e*x**2*atanh(c + d*x)**2/2 + b**2*e*x*atanh(c + d*x) + b**2*
e*log(c/d + x + 1/d)/d - b**2*e*atanh(c + d*x)**2/(2*d) - b**2*e*atanh(c + d*x)/d, Ne(d, 0)), (c*e*x*(a + b*at
anh(c))**2, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 351 vs. \(2 (89) = 178\).
time = 0.42, size = 351, normalized size = 3.69 \begin {gather*} \frac {1}{4} \, {\left (\frac {{\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2}}{{\left (\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}\right )} {\left (d x + c - 1\right )}} - \frac {2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d^{2}} + \frac {2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d^{2}} + \frac {2 \, {\left (\frac {2 \, {\left (d x + c + 1\right )} a b e}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} b^{2} e}{d x + c - 1} - b^{2} e\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}} + \frac {4 \, {\left (\frac {{\left (d x + c + 1\right )} a^{2} e}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} a b e}{d x + c - 1} - a b e\right )}}{\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}}\right )} {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="giac")

[Out]

1/4*((d*x + c + 1)*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1))^2/(((d*x + c + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x +
c + 1)*d^2/(d*x + c - 1) + d^2)*(d*x + c - 1)) - 2*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1) + 1)/d^2 + 2*b^2*e*l
og(-(d*x + c + 1)/(d*x + c - 1))/d^2 + 2*(2*(d*x + c + 1)*a*b*e/(d*x + c - 1) + (d*x + c + 1)*b^2*e/(d*x + c -
 1) - b^2*e)*log(-(d*x + c + 1)/(d*x + c - 1))/((d*x + c + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c + 1)*d^2/(d*x
 + c - 1) + d^2) + 4*((d*x + c + 1)*a^2*e/(d*x + c - 1) + (d*x + c + 1)*a*b*e/(d*x + c - 1) - a*b*e)/((d*x + c
 + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c + 1)*d^2/(d*x + c - 1) + d^2))*((c + 1)*d - (c - 1)*d)

________________________________________________________________________________________

Mupad [B]
time = 1.56, size = 432, normalized size = 4.55 \begin {gather*} x\,\left (a\,e\,\left (b+3\,a\,c\right )-2\,a^2\,c\,e\right )+{\ln \left (1-d\,x-c\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )-\ln \left (1-d\,x-c\right )\,\left (\ln \left (c+d\,x+1\right )\,\left (\frac {b^2\,c\,e\,x}{2}-\frac {\frac {b^2\,e}{2}-\frac {b^2\,c^2\,e}{2}}{2\,d}+\frac {b^2\,d\,e\,x^2}{4}\right )-\frac {x\,\left (4\,b^2\,d^2\,e\,\left (c-1\right )-4\,b^2\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )+8\,b^2\,c\,d^2\,e\right )}{16\,d^2}+\frac {x\,\left (8\,b\,d^2\,e\,\left (4\,a\,c-2\,a+b\,c\right )+4\,b\,d^2\,e\,\left (4\,a+b\right )\,\left (c+1\right )-4\,b\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )\,\left (4\,a+b\right )\right )}{16\,d^2}-\frac {b^2\,d\,e\,x^2}{8}+\frac {b\,d\,e\,x^2\,\left (4\,a+b\right )}{8}\right )+{\ln \left (c+d\,x+1\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )+\frac {\ln \left (c+d\,x+1\right )\,\left (e\,b^2\,c+e\,b^2+a\,e\,b\,c^2-a\,e\,b\right )}{2\,d}+\frac {\ln \left (c+d\,x-1\right )\,\left (-e\,b^2\,c+e\,b^2-a\,e\,b\,c^2+a\,e\,b\right )}{2\,d}+d\,\ln \left (c+d\,x+1\right )\,\left (\frac {x\,\left (e\,b^2+2\,a\,c\,e\,b\right )}{2\,d}+\frac {a\,b\,e\,x^2}{2}\right )+\frac {a^2\,d\,e\,x^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*e + d*e*x)*(a + b*atanh(c + d*x))^2,x)

[Out]

x*(a*e*(b + 3*a*c) - 2*a^2*c*e) + log(1 - d*x - c)^2*((b^2*c*e*x)/4 - (b^2*e - b^2*c^2*e)/(8*d) + (b^2*d*e*x^2
)/8) - log(1 - d*x - c)*(log(c + d*x + 1)*((b^2*c*e*x)/2 - ((b^2*e)/2 - (b^2*c^2*e)/2)/(2*d) + (b^2*d*e*x^2)/4
) - (x*(4*b^2*d^2*e*(c - 1) - 4*b^2*d*e*(d*(c - 1) + d*(c + 1)) + 8*b^2*c*d^2*e))/(16*d^2) + (x*(8*b*d^2*e*(4*
a*c - 2*a + b*c) + 4*b*d^2*e*(4*a + b)*(c + 1) - 4*b*d*e*(d*(c - 1) + d*(c + 1))*(4*a + b)))/(16*d^2) - (b^2*d
*e*x^2)/8 + (b*d*e*x^2*(4*a + b))/8) + log(c + d*x + 1)^2*((b^2*c*e*x)/4 - (b^2*e - b^2*c^2*e)/(8*d) + (b^2*d*
e*x^2)/8) + (log(c + d*x + 1)*(b^2*e - a*b*e + b^2*c*e + a*b*c^2*e))/(2*d) + (log(c + d*x - 1)*(b^2*e + a*b*e
- b^2*c*e - a*b*c^2*e))/(2*d) + d*log(c + d*x + 1)*((x*(b^2*e + 2*a*b*c*e))/(2*d) + (a*b*e*x^2)/2) + (a^2*d*e*
x^2)/2

________________________________________________________________________________________